﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace JibberJabber.PartDesigners
{
    public partial class RootNodeDesigner : PartDesigner
    {
        public RootNodeDesigner()
        {
            InitializeComponent();
            this.Children.Add(new SpeakersNodeDesigner());
        }

        public override string StartXml
        {
            get
            {
                return "<conversation name=\"" + txtName.Text + "\">";
            }
        }

        public override string EndXml
        {
            get
            {
                return "</conversation>";
            }
        }

        public override Type[] AllowedChildren
        {
            get
            {
                return new Type[] { typeof(TextPartDesigner),
                typeof(QuestionDesigner), typeof(DelegateDesigner) };
            }
        }
    }
}
